package com.itheima.day_02;

import java.util.ArrayList;

public class Demo01 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>();
        list.add("1234");
        list.add("12345");
        list.add("2345");
        list.add("678910");
        list.add("123456789");
        System.out.println(method(list));




    }
    public static ArrayList<String> method(ArrayList<String> list){
        ArrayList<String> newlist = new ArrayList<String>();
        for (int i = 0; i < list.size(); i++) {
            if (list.get(i).length()>=5 && list.get(i).length()<=10){
                newlist.add(list.get(i));
            }
        }
        newlist =null;
        return newlist;
    }

    public static void getNewArrayList(ArrayList<String> list){
        for (int i = 0; i < list.size(); i++) {
            String str = list.get(i);
        }



    }



}
